package com.yadang.common.shiro;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;


public class ShrioUtils {

    private static final int hashInterrations = 4;

    public static String encript(String username,String password){

        ByteSource bytes = ByteSource.Util.bytes(username);
        SimpleHash simpleHash=new SimpleHash("md5", password, username,hashInterrations);
        return simpleHash.toString();
    }
}
